/* 
 * File:   SaveOnExitCommand.h
 * Author: Gab'z
 *
 * Created on 13 juin 2012, 13:28
 */

#ifndef SAVEONEXITCOMMAND_H
#define	SAVEONEXITCOMMAND_H

#include "ParametersCommand.h"

namespace calculator {

    class SaveOnExitCommand : public ParametersCommand {
        friend class CommandMap;

    public:
        virtual SaveOnExitCommand* clone() const;

        void apply(Parameters* parameters) const;
        virtual ~SaveOnExitCommand();
        const Memento* createMemento() const throw (CommandException);
        void restoreFromMemento(const Memento* memento) const throw (MementoException);
        
    protected:
        SaveOnExitCommand(const std::string name);
        SaveOnExitCommand(const SaveOnExitCommand& orig);
    };

}

#endif	/* SAVEONEXITCOMMAND_H */

